/**
 * Created by Administrator on 2018/12/25.
 */
import global from './global'
const myFilters = {
  imgListPathFilter: function (imglist) {
    var newImgList=[];
    for (let img of imglist) {
      newImgList.push(global.ImgBaseURL+'/'+img)
    }
    console.log(newImgList);
    return newImgList;
  },
  imgPathFilter: function (img) {
    return global.ImgBaseURL+'/'+img;
  },
  textNumFilter: function (text) {
    if (text.length > 48) {
      return text.slice(0,48) + '...'
    }
    return text;
  },
  goodsNameTextNumFilter: function (text) {
    if (text.length > 8) {
      return text.slice(0,8) + '...'
    }
    return text;
  }
};

export default myFilters;


